package utils;

import java.io.Serializable;
import java.util.LinkedList;


/**
 * 该类以链表形式存储每次服务器轮询返回给当前用户所有用户发送给当前用户的所有聊天记录，
 * 每个节点存放来自同一个人消息的类AccountSendMessageInfoFromOneList
 * */
public class AccountSendMessageInfoList implements Serializable {

    LinkedList<AccountSendMessageInfoFromOneList> accountSendMessageInfoList;

    public int size(){
        return accountSendMessageInfoList.size();
    }

    public AccountSendMessageInfoList(){
        this.accountSendMessageInfoList = new LinkedList<>();
    }

    public void add(AccountSendMessageInfoFromOneList accountSendMessageInfoFromOneList){
        accountSendMessageInfoList.add(accountSendMessageInfoFromOneList);
    }

    public AccountSendMessageInfoFromOneList get(int i){
        return accountSendMessageInfoList.get(i);
    }
}
